<?php
namespace api\controllers;

use yii\rest\ActiveController;

class OrderController extends ActiveController
{
    public $modelClass = 'backend\models\EduActiveOrder';

//    加上分页
//    public $serializer = [
//        'class' => 'yii\rest\Serializer',
//        'collectionEnvelope' => 'items',
//    ];

    public function actions()
    {
        $action = parent::actions();
        unset($action['index']);
        unset($action['create']);
        unset($action['update']);
        unset($action['delete']);
        return $action;

    }

    public function actionIndex()
    {
        return [
            'row1' => 1,
            'row2' => 2,
        ];
    }
}